View Issue Details

IDProjectCategoryView StatusLast Update
0001069K18X001.00 SKB SWANSWpublic2021-01-15 17:20
Reporter(ALTech) Wooshin Kang Assigned To(ALTech) Wooshin Kang Due Date2021-01-08 18:51
PrioritynormalSeveritys2-severeReproducibilityalways
Status closedResolutionwon't fix 
Summary0001069: [SWAN] return DEVICE_OUT_SPDIF
DescriptionBelow is mail from Mr Hwang. Please analysis it ASAP.

Currently, I control volume level in Audioservice as each streamtype.
I get audio output device type using getDeviceForStream() function, it is connected to a speaker, but it is being returned to DEVICE_OUT_SPDIF.
Please check why returned DEVICE_OUT_SPDIF.

Please check attached image.

Thank.

TagsNo tags attached.
Attach Tags

Users monitoring this issue

User List (SW) Peter Chen , (SW) River Wong , (SW) Sita Huang

Activities

(ALTech) Wooshin Kang

2021-01-05 17:55

developer  

spdif.PNG (194,636 bytes)   
spdif.PNG (194,636 bytes)   

(SW) Jacky Chiang

2021-01-06 13:58

manager   ~0005727

Hi Sita,

   Per disussion this morning, please help to trace the code and to check if the root cause is from Audio policy configuration.

(ALTech) Wooshin Kang

2021-01-06 16:26

developer   ~0005733

Hi all,

Due to this issue, there is a problem with controlling the volume of multiple streams. Please check ASAP.

Thank.

(SW) Sita Huang

2021-01-11 09:10

developer   ~0005778

Hi Wooshin,

We found the SPDIF in "attachedDevices" and "devicePorts" of audio policy configuration.
Try to remove the SPDIF and test the "getDeviceForStream()" function, but it still got "AUDIO_DEVICE_OUT_HDMI" in some stream type.

Would we need to remove the HDMI device in "devicePorts" of audio policy configuration? Or other solution to resolve it?

Thanks.
audio_policy_config.png (24,431 bytes)   
audio_policy_config.png (24,431 bytes)   
audio_policy_config2.png (41,284 bytes)   
audio_policy_config2.png (41,284 bytes)   

(ALTech) Wooshin Kang

2021-01-11 09:27

developer   ~0005780

HI sita,

Thanks for your comment.
Point of this issue that "DEVICE_OUT_SPDIF" should be returned when user only set external devices for sound output.
I am sorry but, I don't know what do you do for it ?

Thanks.

(SW) Sita Huang

2021-01-11 12:01

developer   ~0005802

Hi Wooshin,

Thanks for your reply.

The product has no SPDIF output, so we consider removing SPDIF config. When we tried to set the volume, the "getDeviceForStream()" is called multiple times by multiple stream. And the function return "AUDIO_DEVICE_OUT_HDMI" after we remove SPDIF config. I don't know if this is the correct behavior.

I'm sorry, some things need to be clarified:
Q1. After connecting the speakers, what stream type should be output by default ? Or what stream should care about ?
Q2. What external device outputs sound ? When user set external devices, what stream type should be output ?
Q3. Under Q2 or Q3, what device type should be returned by "getDeviceForStream()" ?

If you can, please help answer or ask SPTEK.

Thanks.

(ALTech) Wooshin Kang

2021-01-11 13:21

developer   ~0005803

Hi Sita,

First, I am sorry mistype. "Point of this issue that "DEVICE_OUT_SPDIF" should be returned when user only set external devices for sound output." => "Point of this issue that "AUDIO_DEVICE_OUT_HDMI" should be returned when user only set external devices for sound output."

Q1. After connecting the speakers, what stream type should be output by default ? Or what stream should care about ?
=> Normally, except HDMI pass-through out, all stream should be out from speaker.
Q2. What external device outputs sound ? When user set external devices, what stream type should be output ?
==> It means HDMI pass-through. If user set external devices, audio should be out from hdmi. Please check attached file.
Q3. Under Q2 or Q3, what device type should be returned by "getDeviceForStream()" ?
==> Normally, except HDMI pass-through out, all stream should be out from speaker.

but there are special case. Please check below link.
https://docs.google.com/spreadsheets/d/1nPiuVKMs_0e9Ez2uPAt4obq8KocPfh9vXX1trCpG4sw/edit#gid=0
external_device.jpg (153,262 bytes)   
external_device.jpg (153,262 bytes)   

(SW) Sita Huang

2021-01-11 18:43

developer   ~0005812

Hi Wooshin,

We already committed the modified "audio_policy_configuration.xml" file to resolve "return DEVICE_OUT_SPDIF" issue. But some streams still return "DEVICE_OUT_HDMI".
We tried to modify the configuration of audio policy, but It seems impossible to change the speaker to the highest priority.

The priority selection for sound output is defined in andriod framework. Maybe need some help from SPTEK.

Thanks.

(ALTech) Wooshin Kang

2021-01-12 15:31

developer   ~0005824

Hi Sita

SPTEK is working for it, we may need help from synaptics.

Thanks.

(ALTech) Wooshin Kang

2021-01-12 18:36

developer   ~0005825

Hi Sita,

Please revert your commit to remove SPDIF.
SPTEK wants to remove.

Thanks.

(SW) Jacky Chiang

2021-01-12 19:38

manager   ~0005830

Hi Wooshin,

    Already revert the commit which removed SPDIF device.

Thanks ~

(ALTech) Wooshin Kang

2021-01-15 17:20

developer   ~0005875

SPTEK told me, if we change it, there are too many thing to check. So they want keep current code.

Thanks.

Issue History

Date Modified Username Field Change
2021-01-05 17:55 (ALTech) Wooshin Kang New Issue
2021-01-05 17:55 (ALTech) Wooshin Kang Status new => assigned
2021-01-05 17:55 (ALTech) Wooshin Kang Assigned To => (SW) Jacky Chiang
2021-01-05 17:55 (ALTech) Wooshin Kang File Added: spdif.PNG
2021-01-06 12:01 (SW) Jacky Chiang Issue Monitored: (SW) Peter Chen
2021-01-06 13:37 (SW) Jacky Chiang Issue Monitored: (SW) Sita Huang
2021-01-06 13:57 (SW) Jacky Chiang Assigned To (SW) Jacky Chiang => (SW) Sita Huang
2021-01-06 13:58 (SW) Jacky Chiang Note Added: 0005727
2021-01-06 16:26 (ALTech) Wooshin Kang Note Added: 0005733
2021-01-07 10:47 (SW) Jacky Chiang Issue Monitored: (SW) River Wong
2021-01-11 09:10 (SW) Sita Huang File Added: audio_policy_config.png
2021-01-11 09:10 (SW) Sita Huang File Added: audio_policy_config2.png
2021-01-11 09:10 (SW) Sita Huang Note Added: 0005778
2021-01-11 09:27 (ALTech) Wooshin Kang Note Added: 0005780
2021-01-11 12:01 (SW) Sita Huang Note Added: 0005802
2021-01-11 13:21 (ALTech) Wooshin Kang File Added: external_device.jpg
2021-01-11 13:21 (ALTech) Wooshin Kang Note Added: 0005803
2021-01-11 18:43 (SW) Sita Huang Note Added: 0005812
2021-01-12 15:31 (ALTech) Wooshin Kang Note Added: 0005824
2021-01-12 18:36 (ALTech) Wooshin Kang Note Added: 0005825
2021-01-12 19:38 (SW) Jacky Chiang Note Added: 0005830
2021-01-15 10:45 (SW) Jacky Chiang Assigned To (SW) Sita Huang => (ALTech) Wooshin Kang
2021-01-15 17:20 (ALTech) Wooshin Kang Status assigned => closed
2021-01-15 17:20 (ALTech) Wooshin Kang Resolution open => won't fix
2021-01-15 17:20 (ALTech) Wooshin Kang Note Added: 0005875